/**
 * @author Javen 
 * @copyright 2018-11-24 15:05:33 javendev@126.com 
 * @description 加载图片示例
 */
var Utils = require("./common/Utils");
cc.Class({
    extends: cc.Component,

    properties: {
        image: {
            default: null,
            type: cc.Node,
            tooltip: "图像节点"
        }
    },

    // onLoad () {},
    btnClick(event, data) {
        switch (data) {
            case 'back':
                cc.director.loadScene("Scene");
                break;
            case 'localImg':
                Utils.loadLocal(this.image, "GameRes://qrcode.png");
                break;
            case 'netImg':
                Utils.loadImgByUrl(this.image, "https://gitee.com/javen205/IJPay/raw/master/assets/img/IJPay-t.png");
                break;
            case 'net2Img':
                Utils.loadImgByUrl(this.image, "http://thirdqq.qlogo.cn/g?b=sdk&k=OiaMLzXmbEwq5trqsR6zd1A&s=100&t=1483310911");
                break;
            default:
                break;
        }
    },

    start() {

    },

    // update (dt) {},
});